<template>
  <div class="pdf_frame">
    <VuePdfEmbed :source="source" style="height:100%;width:100%;overflow-y:scroll" />
  </div>
</template>

<script>
import VuePdfEmbed from 'vue-pdf-embed/dist/vue2-pdf-embed'
import { mapState } from 'vuex' 
export default {
name:'PdfView',
components:{
  VuePdfEmbed
},
props:{
  process:{
    type:Object,
    required:true
  }
},
data(){
  return {
    
  }
},
computed:{
  ...mapState('userAbout',['token']),
  source(){
    if(this.process.meta&&this.process.meta.file){
      return `http://localhost:9001/oss/getFileByteArrayByFileId?fileId=${this.process.meta.file.fileId}&yToken=${this.token}`
    }
  }
}
}
</script>

<style>
.pdf_frame{
  width:100%;
  height:100%;
}
</style>